//
//  PriceTableViewCell.m
//  110
//
//  Created by 沈鑫 on 16/4/11.
//  Copyright © 2016年 乔砥. All rights reserved.
//

#import "PriceTableViewCell.h"

@implementation PriceTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 200, 20)];
        [self.contentView addSubview:_titleLabel];
        
        _View = [[UIView alloc]initWithFrame:CGRectMake(KWIDTH - 110, 5, 100, 30)];
        _View.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_View];
        
        _priceLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 30)];
        _priceLabel.textColor = [UIColor whiteColor];
        _priceLabel.textAlignment = NSTextAlignmentCenter;
        [self.View addSubview:_priceLabel];
    }
    return self;
}

- (void)getModel:(PriceModel *)model
{
    _titleLabel.text = model.refpharmaciesnamecn;
    _priceLabel.text = [NSString stringWithFormat:@"￥%ld",model.price];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
